package com.ieei.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import com.ieei.entity.Article;
import com.ieei.entity.User;
import com.ieei.mapper.IUserOperation;
import com.ieei.service.UserService;
@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService{
	@Autowired
	private IUserOperation userDao;

	@Override
	public User findByNameOrId(User user) {
		Assert.notNull(user, "id is not null");
		return userDao.findByNameOrId(user);
	}

	@Override
	public Map<String, Object> findMap(Long id) {
		return userDao.findMap(id);
	}

	@Override
	public List<Article> getUserArticles(Long id) {
		// TODO Auto-generated method stub
		return userDao.getUserArticles(id);
	}
	
}
